<template>
  <el-date-picker style="width: 100%;" v-model="modelValue" :shortcuts="shortcuts" format="YYYY-MM-DD"
    value-format="YYYY-MM-DD 00:00:00"></el-date-picker>
</template>
<script lang="ts" setup>
const modelValue = defineModel();
const shortcuts = [
  {
    text: '今天',
    value: new Date(),
  },
  {
    text: '昨天',
    value: () => {
      const date = new Date()
      date.setTime(date.getTime() - 3600 * 1000 * 24)
      return date
    },
  },
  {
    text: '上周',
    value: () => {
      const date = new Date()
      date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
      return date
    },
  },
]
</script>
<style lang="scss" scope></style>
